package com.atguigu.lease.common.context;

import com.mysql.cj.log.Log;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

public class LoginUserContext {
    private static ThreadLocal<LoginUser> context = new ThreadLocal<>();

    public static void setContext(LoginUser loginUser) {
        context.set(loginUser);
    }


    public static LoginUser getContext() {
        return context.get();
    }



    public static void removeContext(){
        context.remove();
    }
}
